package com.zsx.shopping.auth.form;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;

@Data
public class LoginForm {

    @NotBlank(message = "用户名不能为空")
    @Length(min = 3, max = 20, message = "用户名要求3-20位")
    private String username;

    @NotBlank(message = "密码不能为空")
    @Length(min = 6, max = 20, message = "密码要求6-20位")
    private String password;

    @NotBlank(message = "验证码不能为空")
    @Length(min = 4, max = 4, message = "验证码要求4位")
    private String code;
}
